# -*- coding:utf-8 -*-
# -------------------------------------------------------------------------------
# Description:  
# Reference:
# Author: 安智军
# Date:   2021/12/27
# -------------------------------------------------------------------------------
import time
import datetime

def m_Suffix():
    '''
    一般新建资料中，防止字段名称重复，在字段后面加的后缀
    :return: 211227163936--年月日时分秒，年为后两位
    '''
    suffix = datetime.datetime.now().strftime('%y%m%d%H%M%S')
    return suffix

def get_strTime():
    '''
    获取标准时间
    :return: strTime  2021-12-20 17:14:21 <class 'str'>
    '''
    strTime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    return strTime


def get_Time_rubbing():
    '''
    获取时间搓  将日期转为秒级时间戳  2021-12-20 17:14:21 --> 1639992584
    :return: 1639992584
    '''
    ts = int(time.mktime(time.strptime(get_strTime(), "%Y-%m-%d %H:%M:%S")))
    return ts


def get_raw_str_time():
    '''
    获取标准时间,对时间格式不处理
    :return: 2021-12-20 17:14:21 -->20211220173311
    '''
    get_raw_str_time = time.strftime("%Y%m%d%H%M%S", time.localtime())
    return get_raw_str_time


print(get_Time_rubbing())